package com.seanzx.common;

public class StringUtils {
    public static String lpad(String origin, int len, char pad) {
        StringBuilder builder = new StringBuilder();
        for (int i = 0; i < len - origin.length(); i++) {
            builder.append(pad);
        }
        return builder.toString() + origin;
    }

    public static boolean equals(String val1, String val2) {
        if (val1 == null) {
            return val2 == null;
        }
        return val1.equals(val2);
    }

    public static boolean isEmpty(String string) {
        return string == null || string.isEmpty();
    }
}
